<template>
  <div>
    <input type="text" v-model="inputValue">
    <button @click="add">添加</button>
  </div>
</template>

<script setup>
import { ref } from 'vue'
const list = ref(['html', 'css', 'js'])
const inputValue = ref('')
const add = () => {
  list.value.push(inputValue.value)
  inputValue.value = ''
}

defineExpose({
  list: list
})
</script>

<style lang="css" scoped></style>